package com.dao.impl;

import com.bean.BhRole;
import com.dao.BhRoleDao;
import com.util.AliPool;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public class BhRoleDaoImpl implements BhRoleDao {
    QueryRunner runner=new QueryRunner();
    @Override
    public List<BhRole> selqx(int uSystem) throws SQLException {
        String sql="select * from BhRole where id=?";
        Connection conn= AliPool.getConn();
        List list=runner.query(conn, sql,new BeanListHandler<BhRole>(BhRole.class),uSystem);
        conn.close();
        return list;
    }
}
